ARM: VGIC: factor out vgic_connect_hw_irq()
authorAndre Przywara <andre.przywara@linaro.org>
Tue, 6 Feb 2018 17:09:00 +0000 (17:09 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 8 Feb 2018 21:18:11 +0000 (13:18 -0800)
commitec2a2f1de4a98bef1f0d993b2fea6b750223d1fc
tree7aa2ad9c13ef96311a8b86dd30bf2946ba566c90
parenta76dd67e5a3cf7b7065973ff78b39e876c0b879a
ARM: VGIC: factor out vgic_connect_hw_irq()

At the moment we happily access VGIC internal data structures like
the rank and struct pending_irq in gic.c, which should be VGIC agnostic.

Factor out a new function vgic_connect_hw_irq(), which allows a virtual
IRQ to be connected to a hardware IRQ (using the hw bit in the LR).

This removes said accesses to VGIC data structures and improves abstraction.

One thing to note is that this changes the locking scheme slightly:
we hold the rank lock for a shorter period of time, not covering some
of the later lines, which deal with the "irq_desc" structure only. This
should not have any adverse effect, but is a change in locking anyway.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/gic-vgic.c
xen/arch/arm/gic.c
xen/include/asm-arm/vgic.h